package com.avantis.admin.config.shiro;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;


@ApiModel(description = "登陆模型")
@Data
public class LoginModel {

    @ApiModelProperty("用户名、手机号码、账号")
    @NotNull(message = "用户名是必填项!")
    @NotEmpty(message = "用户名是必填项!")
    @NotEmpty(message = "用户名不能为空!")
    private String account;

    @ApiModelProperty("密码")
    @NotNull(message = "密码是必填项!")
    @NotEmpty(message = "密码不能为空!")
    private String password;

    public LoginModel() {
    }

    public LoginModel(@NotNull(message = "用户名是必填项!") @NotEmpty(message = "用户名不能为空!") String account, @NotNull(message = "密码是必填项!") @NotEmpty(message = "密码不能为空!") String password) {
        this.account = account;
        this.password = password;
    }

}